import request from "@/utils/request";

// 获取首页轮播图列表,分页
export function getBannerList(data) {
  return request({
    url: "/Banner/list",
    method: "get",
    params: data,
  });
}

// 获取详细数据
export function getBannerById(data) {
  return request({
    url: "/Banner/ " + data,
    method: "get",
  });
}

// 添加首页轮播图数据
export function addBanner(data) {
  return request({
    url: "/Banner",
    method: "post",
    data: data,
  });
}

// 修改首页轮播图数据
export function updateBanner(data) {
  return request({
    url: "/Banner/update",
    method: "put",
    data: data,
  });
}

// 删除首页轮播图数据
export function deleteBanner(data) {
  return request({
    url: "/Banner/" + data,
    method: "delete",
  });
}

// 删除多个数据
export function deleteBanners(data) {
  return request({
    url: "/Banner/batch",
    method: "delete",
    data: data,
  });
}

// 导出数据
export function exportBanner(data) {
  return request({
    url: "/Banner/export",
    method: "post",
    data: data,
    responseType: "blob",
  });
}
